package com.example.hello.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class Comment {
    private Long commentId;
    private Long userId;
    private Long attractionId;
    private String content;
    private Long parentCommentId;
    private Integer likeCount;
    private Integer status;
    private Boolean isTop;
    private BigDecimal rating;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;
    
    // 关联实体
    private User user;
    private Attraction attraction;
    private Comment parentComment;
    private List<Comment> childComments;
    
    // 额外字段，不在数据库表中
    private List<String> images;
} 